<?php
namespace Twoir\Service\ShowKey;

/**
 * 验证码接口
 *
 * cighsen02 365182575
 * time: 2024.05.06
*/
interface OutputInterface
{
    const WIDTH = 47;

	const HEIGHT = 20;

	const MIME = [
        'jpg'   => 'image/jpeg',
        'jpeg'  => 'image/jpeg',
        'png'   => 'image/png',
        'gif'   => 'image/gif',
        'wbmp'  => 'image/vnd.wap.wbmp'
    ];

	const VERIFY_KEY = [
		// 登陆
		'login'			=> 'checkloginkey',
		// 注册
		'reg'			=> 'checkregkey',
		'info'			=> 'checkinfokey',
		'spacefb'		=> 'checkspacefbkey',
		'spacegb'		=> 'checkspacegbkey',
		'gbook'			=> 'checkgbookkey',
		'feedback'		=> 'checkfeedbackkey',
		'getpassword'	=> 'checkgetpasskey',
		'regsend'		=> 'checkregsendkey',
		'report' 		=> 'checkreportkey',
		// 评论
		'pl'			=> 'checkplkey'
	];
	// 默认颜色
	const DEFAULT_RGB = [
		// 背景色
		'keybgcolor' 	=> [102, 102, 102],
		// 文字色
		'keyfontcolor'	=> [255, 255, 255],
		// 干扰色
		'keydistcolor'	=> [71, 71, 71]
	];
    /**
     * 验证码渲染
     *
     * @param array $add
     * @return string
    */
    public function render(array $add): string;
}
